Many documents use hierarchical structure to improve comprehension and to allow for internal cross-referencing. However, managing hierarchical structure while editing a document can present many challenges. For example, during editing, elements may be added at various hierarchical levels, new hierarchical levels may be created and/or removed, and elements may be moved among hierarchical levels. Such changes may impact portions of the document other than those being directly edited. The impacted portions of the document may need to be updated in response to the edits, which may complicate the editing process.